﻿@model OnlineExam.Entities.Exam


<div class="editor-label">
    @Html.LabelFor(model => model.Address)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Address)
    @Html.ValidationMessageFor(model => model.Address)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.DateTime)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.DateTime)
    @Html.ValidationMessageFor(model => model.DateTime)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Syllabus)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Syllabus)
    @Html.ValidationMessageFor(model => model.Syllabus)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Notes)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Notes)
    @Html.ValidationMessageFor(model => model.Notes)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.CreatedAt)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.CreatedAt)
    @Html.ValidationMessageFor(model => model.CreatedAt)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.UpdatedAt)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.UpdatedAt)
    @Html.ValidationMessageFor(model => model.UpdatedAt)
</div>

<div class="editor-label">
    Category
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.CategoryID, ((IEnumerable<OnlineExam.Entities.Category>)ViewBag.PossibleCategory).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.CategoryID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.CategoryID)
</div>
